#pragma once

#include "EventEngine.h"

class CEventFDTrigger : public CEvent
{
public:
    CEventFDTrigger(CEventEngine *pEngine);
    virtual ~CEventFDTrigger();

public:
    Bool TriggerReadEvent();

protected:
    virtual Int32 GetFD() const override final { return m_nEventFD; }
    virtual void  OnRead() override final { OnEventFDTrigger(); }
    virtual void  OnWrite() override final { assert(false); }
    virtual void  OnError(Int32 nErrCode) override final { assert(false); }
    virtual void  OnEventFDTrigger() = 0;

protected:
    Int32 m_nEventFD;
};
